package models

import (
	"fmt"
	"gorm.io/gorm"
	"main.go/utils"
	"time"
)

type UserBasic struct {
	gorm.Model
	Name         string
	PassWord     string
	Phone        string
	Email        string
	ClentIP      string
	Identity     string
	ClientIp     string
	CLientPort   string
	LoginTime    time.Time
	HearbeatTime time.Time
	LoginOutTime time.Time
	IsLogout     bool
	DeviceInfo   string
}

func (table *UserBasic) TableName() string {
	return "user_basic"
}

func GetUserList() []*UserBasic {
	data := make([]*UserBasic, 10)
	utils.Db.Find(&data)
	for _, v := range data {
		fmt.Println(v)
	}
	return data
}
